using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class PlayerManager  {

    private static PlayerManager _instance;
    public static PlayerManager Instance
    {
        get
        {
            if (_instance == null)
                _instance = new PlayerManager();

            return _instance;
        }
    }

    private string _currentLevel;

    public string CurrentLevel
    {
        get { return _currentLevel; }
        set { _currentLevel = value; }
    }
    private string _nextLevel;

    public string NextLevel
    {
        get { return _nextLevel; }
        set { _nextLevel = value; }
    }
    private int _nbStar = 0;
    

    // Use this for initialization
    private PlayerManager()
    {

    }
    
    //Set Result for current Level
    public void SetLevelResult(string level, string nextLevel)
    {
        _currentLevel = level;
        _nextLevel = nextLevel;
    }

    //Get Result of previous level
    public void GetLastLevelResult(out int nbStar, out string nextLevel)
    {
        nbStar = _nbStar;
        nextLevel = _nextLevel;
    }

    public string GetLastLevelName()
    {
        return _currentLevel;
    }

    public int NbStar
    {
        get { return _nbStar; }
        set { _nbStar = value; }
    }

}
